package com.ruoyi.edit.service.impl;


import com.ruoyi.edit.domain.vo.EditVo;
import com.ruoyi.edit.domain.vo.FileVo;
import com.ruoyi.edit.domain.vo.OrderVo;
import com.ruoyi.edit.mapper.EditMapper;
import com.ruoyi.edit.mapper.OderMapper;
import com.ruoyi.edit.service.IEditService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class EditServiceImpl implements IEditService {
    @Resource
    private EditMapper editMapper;

    @Resource
    private OderMapper orderMapper;


    @Override
    public List<EditVo> selectList(EditVo editEntity) {
        return editMapper.selectEditVoList(editEntity);
    }

    @Override
    public int updateUserStatus(EditVo vo) {
        return editMapper.updateUserStatus(vo.getEditId(), vo.getStatus());
    }

    @Override
    public EditVo selectEditById(Long id) {
        return editMapper.selectEditById(id);
    }

    @Override
    public int updateEdit(EditVo vo) {
        return editMapper.updateEditVo(vo);
    }

    @Override
    public List<OrderVo> getOderByUserId(String userId) {
        return orderMapper.getOderByUserId(userId);
    }

    @Override
    public List<FileVo> getFileList(OrderVo orderVo) {
        return orderMapper.getFileListByOrder(orderVo);
    }

    @Override
    public int deleteFile(Long fileId) {
        return orderMapper.deleteFileById(fileId);
    }
}
